package butines.core.gui;

import butines.core.Mouse;

public class MouseEvent {

    private GUIComponent source;
    private int mouseX;
    private int mouseY;
    private boolean button1;
    private boolean button2;
    private boolean button3;
    private boolean shift;
    private boolean ctrl;
    private boolean alt;

    public MouseEvent(GUIComponent source, Mouse mouse, boolean[] pressed) {
        this.source = source;
        mouseX = mouse.getMouseX();
        mouseY = mouse.getMouseY();
        button1 = pressed[0];
        button2 = pressed[1];
        button3 = pressed[2];
        shift = mouse.isShift();
        ctrl = mouse.isCtrl();
        alt = mouse.isAlt();
    }
    
    public int getMouseX() {
        return mouseX;
    }

    public int getMouseY() {
        return mouseY;
    }

    public boolean isButton1() {
        return button1;
    }

    public boolean isButton2() {
        return button2;
    }

    public boolean isButton3() {
        return button3;
    }

    public boolean isShift() {
        return shift;
    }

    public boolean isCtrl() {
        return ctrl;
    }

    public boolean isAlt() {
        return alt;
    }

    public GUIComponent getSource() {
        return source;
    }

}
